package org.bambrikii.photobank.imaging.meta.impl;

import java.io.File;
import java.io.IOException;
import java.util.Map;

import org.bambrikii.photobank.imaging.meta.MetadataManager;
import org.bambrikii.photobank.imaging.meta.MetadataManagerException;

import com.drew.imaging.jpeg.JpegProcessingException;

@Deprecated
public class DrewnoakesMetadataManager implements MetadataManager {
	public static MetadataDirectory getMetadata(String fileName) throws IOException, JpegProcessingException {
		throw new JpegProcessingException("Not implemented. Deprecated.");
		// File jpegFile = new File(fileName);
		// Metadata metadata = JpegMetadataReader.readMetadata(jpegFile);
		// Directory iptcDirectory = metadata.getDirectory(IptcDirectory.class);
		// MetadataDirectory metadataDir = new MetadataDirectory(iptcDirectory);
		// return metadataDir;
	}

	@Override
	public Map<String, Map<String, String>> getMetadataMap(File file) throws MetadataManagerException {
		throw new MetadataManagerException("Not implemented. Deprecated.", new Exception("Not implemented"));
		// try {
		// Map<String, Map<String, String>> mm = new HashMap<String, Map<String, String>>();
		//
		// Metadata metadata = JpegMetadataReader.readMetadata(file);
		// Iterator directories = metadata.getDirectoryIterator();
		// while (directories.hasNext()) {
		// Directory directory = (Directory) directories.next();
		// Map<String, String> mmd = new HashMap<String, String>();
		// mm.put(directory.getName(), mmd);
		// Iterator tags = directory.getTagIterator();
		// while (tags.hasNext()) {
		// Tag tag = (Tag) tags.next();
		// mmd.put(tag.getTagName(), tag.getDescription());
		// }
		// }
		// return mm;
		// } catch (Exception ex) {
		// throw new MetadataManagerException("Metadata reading failed.", ex);
		// }
	}
}
